Skip to content

ref(crons): Drop the check-in monitor_config column - #127451

Draft
wedamija wants to merge 1 commit into
danf/crons-remove-checkin-monitor-config-statefrom
danf/crons-drop-checkin-monitor-config
Draft

wedamija wants to merge 1 commit into
danf/crons-remove-checkin-monitor-config-statefrom
danf/crons-drop-checkin-monitor-config

Conversation

@wedamija

@wedamija wedamija commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Do not merge yet.

Drops the monitor_config column.

Merge order:

  1. sentry#126542: Backfill config references
  2. sentry#127449: Stop reading monitor_config (30+ days after sentry#126539 deploys)
  3. sentry#127450: Remove the field from the model, MOVE_TO_PENDING (after 2 deploys)
  4. sentry#127451: Drop the column, DELETE (after 3 deploys) ← this PR

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 14, 2026
@sentry

sentry Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Sentry Snapshot Testing

Name Added Removed Changed Renamed Unchanged Skipped Status
sentry-frontend
sentry-frontend
0 0 0 0 630 0 ✅ Unchanged

⚙️ sentry-frontend Snapshot Settings

@github-actions

Copy link
Copy Markdown
Contributor

This PR has a migration; here is the generated SQL for src/sentry/monitors/migrations/0017_backfill_checkin_config.py src/sentry/monitors/migrations/0018_fill_missing_checkin_config.py src/sentry/monitors/migrations/0019_make_checkin_config_not_null.py src/sentry/monitors/migrations/0020_remove_checkin_monitor_config.py src/sentry/monitors/migrations/0021_drop_checkin_monitor_config.py

for 0017_backfill_checkin_config in monitors

--
-- Raw Python operation
--
-- THIS OPERATION CANNOT BE WRITTEN AS SQL

for 0018_fill_missing_checkin_config in monitors

--
-- Raw Python operation
--
-- THIS OPERATION CANNOT BE WRITTEN AS SQL

for 0019_make_checkin_config_not_null in monitors

--
-- Alter field checkin_config on monitorcheckin
--
SET CONSTRAINTS "sentry_monitorchecki_checkin_config_id_17e2de71_fk_sentry_mo" IMMEDIATE; ALTER TABLE "sentry_monitorcheckin" DROP CONSTRAINT "sentry_monitorchecki_checkin_config_id_17e2de71_fk_sentry_mo";
ALTER TABLE "sentry_monitorcheckin" ADD CONSTRAINT "sentry_monitorchecki_checkin_config_id_17e2de71_fk_sentry_mo" FOREIGN KEY ("checkin_config_id") REFERENCES "sentry_monitorcheckinconfig" ("id") DEFERRABLE INITIALLY DEFERRED NOT VALID;
ALTER TABLE "sentry_monitorcheckin" VALIDATE CONSTRAINT "sentry_monitorchecki_checkin_config_id_17e2de71_fk_sentry_mo";
ALTER TABLE "sentry_monitorcheckin" ADD CONSTRAINT "sentry_monitorcheckin_checkin_config_id_17e2de71_notnull" CHECK ("checkin_config_id" IS NOT NULL) NOT VALID;
ALTER TABLE "sentry_monitorcheckin" VALIDATE CONSTRAINT "sentry_monitorcheckin_checkin_config_id_17e2de71_notnull";
ALTER TABLE "sentry_monitorcheckin" ALTER COLUMN "checkin_config_id" SET NOT NULL;
ALTER TABLE "sentry_monitorcheckin" DROP CONSTRAINT "sentry_monitorcheckin_checkin_config_id_17e2de71_notnull";

for 0020_remove_checkin_monitor_config in monitors

--
-- Moved monitorcheckin.monitor_config field to pending deletion state
--
-- (no-op)

for 0021_drop_checkin_monitor_config in monitors

--
-- Remove field monitor_config from monitorcheckin
--
ALTER TABLE "sentry_monitorcheckin" DROP COLUMN "monitor_config" CASCADE;

@wedamija
wedamija force-pushed the danf/crons-remove-checkin-monitor-config-state branch from 01bb170 to 1868662 Compare October 14, 2026 22:01
@wedamija
wedamija force-pushed the danf/crons-drop-checkin-monitor-config branch from d56e2a9 to 1b52a65 Compare October 14, 2026 22:02
@github-actions

Copy link
Copy Markdown
Contributor

This PR has a migration; here is the generated SQL for src/sentry/monitors/migrations/0017_backfill_checkin_config.py src/sentry/monitors/migrations/0018_remove_checkin_monitor_config.py src/sentry/monitors/migrations/0019_drop_checkin_monitor_config.py

for 0017_backfill_checkin_config in monitors

--
-- Raw Python operation
--
-- THIS OPERATION CANNOT BE WRITTEN AS SQL

for 0018_remove_checkin_monitor_config in monitors

--
-- Moved monitorcheckin.monitor_config field to pending deletion state
--
-- (no-op)

for 0019_drop_checkin_monitor_config in monitors

--
-- Remove field monitor_config from monitorcheckin
--
ALTER TABLE "sentry_monitorcheckin" DROP COLUMN "monitor_config" CASCADE;

@wedamija
wedamija force-pushed the danf/crons-remove-checkin-monitor-config-state branch from 1868662 to 7b60166 Compare October 15, 2026 21:57
@wedamija
wedamija force-pushed the danf/crons-drop-checkin-monitor-config branch from 1b52a65 to e97aa8c Compare October 15, 2026 21:57
@github-actions

Copy link
Copy Markdown
Contributor

This PR has a migration; here is the generated SQL for src/sentry/monitors/migrations/0021_remove_checkin_monitor_config.py src/sentry/monitors/migrations/0022_drop_checkin_monitor_config.py

for 0021_remove_checkin_monitor_config in monitors

--
-- Moved monitorcheckin.monitor_config field to pending deletion state
--
-- (no-op)

for 0022_drop_checkin_monitor_config in monitors

--
-- Remove field monitor_config from monitorcheckin
--
ALTER TABLE "sentry_monitorcheckin" DROP COLUMN "monitor_config" CASCADE;

@getsantry

getsantry Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you add the label WIP, I will leave it alone unless WIP is removed ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry Bot added the Stale label Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Backend Test Failures

Failures on 93229a2 in this run:

tests/snuba/api/endpoints/test_organization_trace_item_attributes.py::OrganizationTraceItemAttributeValuesEndpointSpansTest::test_tags_keys_autocomplete_noop — log
[gw0] linux -- Python 3.13.15 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/snuba/api/endpoints/test_organization_trace_item_attributes.py:2542: in test_tags_keys_autocomplete_noop
    assert response.data == [], key
E   AssertionError: trace
E   assert [{'count': 1,...': None, ...}] == []
E     
E     Left contains 3 more items, first extra item: �[0m{�[33m'�[39;49;00m�[33mcount�[39;49;00m�[33m'�[39;49;00m: �[94m1�[39;49;00m, �[33m'�[39;49;00m�[33mfirstSeen�[39;49;00m�[33m'�[39;49;00m: �[94mNone�[39;49;00m, �[33m'�[39;49;00m�[33mkey�[39;49;00m�[33m'�[39;49;00m: �[33m'�[39;49;00m�[33mtrace�[39;49;00m�[33m'�[39;49;00m, �[33m'�[39;49;00m�[33mlastSeen�[39;49;00m�[33m'�[39;49;00m: �[94mNone�[39;49;00m, ...}�[90m�[39;49;00m
E     
E     Full diff:
E     �[0m�[91m- []�[39;49;00m�[90m�[39;49;00m
E     �[92m+ [�[39;49;00m�[90m�[39;49;00m
E     �[92m+     {�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'count': 1,�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'firstSeen': None,�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'key': 'trace',�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'lastSeen': None,�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'name': '1ebcdc0301084485a50d999bfa01c3a6',�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'value': '1ebcdc0301084485a50d999bfa01c3a6',�[39;49;00m�[90m�[39;49;00m
E     �[92m+     },�[39;49;00m�[90m�[39;49;00m
E     �[92m+     {�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'count': 1,�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'firstSeen': None,�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'key': 'trace',�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'lastSeen': None,�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'name': '470115c691e942b59642702ea25f3b4c',�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'value': '470115c691e942b59642702ea25f3b4c',�[39;49;00m�[90m�[39;49;00m
E     �[92m+     },�[39;49;00m�[90m�[39;49;00m
E     �[92m+     {�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'count': 1,�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'firstSeen': None,�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'key': 'trace',�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'lastSeen': None,�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'name': 'a1dac2d1ce5e417199c8ca9df1f60080',�[39;49;00m�[90m�[39;49;00m
E     �[92m+         'value': 'a1dac2d1ce5e417199c8ca9df1f60080',�[39;49;00m�[90m�[39;49;00m
E     �[92m+     },�[39;49;00m�[90m�[39;49;00m
E     �[92m+ ]�[39;49;00m�[90m�[39;49;00m

@getsantry getsantry Bot removed the Stale label Nov 7, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant